<template>
  <div>
    <div class="label-value">
      <div class="label">标题</div>
      <div class="value">
        <el-input
          size="mini"
          v-model="viewModel.title"
          placeholder="请输入标题标题"
        />
      </div>
    </div>
    <div class="label-value">
      <div class="label">默认值</div>
      <div class="value">
        <el-input size="mini" v-model="viewModel.defaultValue" />
      </div>
    </div>
    <div class="label-value">
      <div class="label">最多填</div>
      <div class="value">
        <el-input size="mini" v-model="viewModel.maxLength" type="number">
          <template slot="append">个字符</template>
        </el-input>
      </div>
    </div>
    <div class="label-value">
      <div class="label">是否必填</div>
      <div class="value">
        <el-switch v-model="viewModel.required" />
      </div>
    </div>
    <div class="label-value">
      <div class="label">输入统计</div>
      <div class="value">
        <el-switch v-model="viewModel.showLimit" />
      </div>
    </div>
    <div class="label-value">
      <div class="label">是否只读</div>
      <div class="value">
        <el-switch v-model="viewModel.isReadonly" />
      </div>
    </div>
    <div class="label-value">
      <div class="label">是否禁用</div>
      <div class="value">
        <el-switch v-model="viewModel.isDisable" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "inputConfig",
  components: {},
  props: ["currCfg"],
  data() {
    return {};
  },
  computed: {
    viewModel() {
      return this.currCfg.config;
    },
  },
  methods: {},
  mounted() {},
};
</script>,
<style lang="scss" scoped>
</style>
